package cn.ac.jaas.ljx.spring.async;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = 
				new AnnotationConfigApplicationContext(AsyncTaskExecutorConfig.class);
		DemoAsyncTaskService asyncTask =  context.getBean(DemoAsyncTaskService.class);
		for(int i=1; i<=10; i++) {
			asyncTask.asyncTask(i);
			asyncTask.asyncTaskPlus(i);
		}
		context.close();
	}
}
